package cn.ppool.xmlmapper.sql;

import java.util.List;
import java.util.Map;

public interface RequestSqlService {


    List<Map> queryToMap(String sql, Map<String, Object> allVar, Map<String, Object> sqlVar);

    <T> List<T> queryToBean(String sql, Map<String, Object> allVar, Map<String, Object> sqlVar, Class<T> clazz);

    int requestUpdate(String sql, Map<String, Object> allVar, Map<String, Object> sqlVar);

    int requestDelete(String sql, Map<String, Object> allVar, Map<String, Object> sqlVar);

    int requestInsert(String sql, Map<String, Object> allVar, Map<String, Object> sqlVar);

    int requestUpdateEntity(Class clazz, Object entity);

    int requestInsertEntity(Class clazz, Object entity);

    int requestDeleteEntity(Class clazz, Object entity);

    void flush();

}
